package com.springcloud.sc.ucp.v5.api.mongo.locationdb;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * 用户详细表相关的对象
 */

@Data
@Document(collection = "webuserdetailinfo")
public class UserDetailInfo implements Serializable {

	private static final long serialVersionUID = -7898194272883238670L;

	@Id
	private String DN;
	// 字段信息
	public double Longitude;
	public double Latitude;
	public double speed;
	public int direction;
	public double height;
	public int status;
	public String startTime;
	public String endTime;
	public String totalRoute;
	public String route;
	public String clearTime;
	public String userStatus; // 0 离线 1 在线空闲 2 在线忙碌
	public String userCallStatus; // 对端号码， 呼叫状态
	public String userType;
	public String nodeNumber;

	@Override
	public boolean equals(Object obj) {
		if (obj != null && obj instanceof UserDetailInfo) {
			if (((UserDetailInfo) obj).DN.equals(this.DN)) {
				return true;
			}
		}
		return false;
	}

	@Override
	public String toString() {
		return "UserDetailInfo{" +
				"DN='" + DN + '\'' +
				", Longitude=" + Longitude +
				", Latitude=" + Latitude +
				", speed=" + speed +
				", direction=" + direction +
				", height=" + height +
				", status=" + status +
				", startTime='" + startTime + '\'' +
				", endTime='" + endTime + '\'' +
				", totalRoute='" + totalRoute + '\'' +
				", route='" + route + '\'' +
				", clearTime='" + clearTime + '\'' +
				", userStatus='" + userStatus + '\'' +
				", userCallStatus='" + userCallStatus + '\'' +
				", userType='" + userType + '\'' +
				", nodeNumber='" + nodeNumber + '\'' +
				'}';
	}
}
